import Vue from 'vue';
import Router from 'vue-router';
import Loading from '@/components/Loading';//加载页面1
import Home from '@/components/Home';//首页2
import Detail from '@/components/Detail';//详情
import ApplyNotes from '@/components/ApplyNotes';//报名须知
import ApplyNotesForm from '@/components/ApplyNotesForm';//报名表单
import TicketConfirm from '@/components/TicketConfirm';//抢票确认
import TicketCouplets from '@/components/TicketCouplets';//抢票对联
import TicketAgreement from '@/components/TicketAgreement';//抢票协议
Vue.use(Router)

const router = new Router({
  mode:'hash',
  routes: [
    {
      path: '/',
      name: 'Loading',
      component: Loading
    },{
      path: '/home',
      name: 'home',
      component: Home
    },{
      path:'/detail',
      name:'detail',
      component: Detail
    },{
      path:'/applyNotes',
      name:'applyNotes',
      component:ApplyNotes
    },{
      path:'/applyNotesForm',
      name:'applyNotesForm',
      component:ApplyNotesForm
    },{
      path:'/ticketConfirm',
      name:'ticketConfirm',
      component:TicketConfirm
    },{
      path:'/ticketCouplets',
      name:'ticketCouplets',
      component: TicketCouplets
    },{
      path:'/ticketAgreement',
      name:'ticketAgreement',
      component:TicketAgreement
    }       
  ]
})

/**
* 进入路由之前
* **/ 
router.beforeEach((to, from, next) => {
  next();
});
router.afterEach(()=>{
})
export default router;